package com.best4cloud.user.domain;

import com.best4cloud.common.database.base.BaseAuditingEntity;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import javax.persistence.Entity;
import javax.persistence.Table;

@Data
@Entity
@Table(name = "sys_dept")
@SQLDelete(sql = "update sys_dept set deleted = 1 where id = ?")
@Where(clause = "deleted = 0")
public class SysDept extends BaseAuditingEntity {

    /**
     * 部门名称
     */
    private String name;

    /**
     * 部门排序
     */
    private Integer sort;

    /**
     * 父 ID
     */
    private Long parentId;

    /**
     * 逻辑删除
     */
    private boolean deleted;

}
